/*
package com.tarena.lbs.gateway.filter;

import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.core.Ordered;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

@Component
public class GlobalUnicodeFilter implements GlobalFilter, Ordered {

    //控制全局的响应编码
    @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        //主流浏览器可以支持application/json
        //但是有些浏览器不支持，所以我们要设置一下带charset=utf-8的响应头
        exchange.getResponse().getHeaders().setContentType(MediaType.APPLICATION_JSON_UTF8);
        return chain.filter(exchange);
    }

    @Override public int getOrder() {
        return Integer.MIN_VALUE;
    }
}
*/
